Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/vue-3

Package Overview
Dependencies
Maintainers
5
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/vue-3

Vue components for tiptap

  • 2.10.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is @tiptap/vue-3?

@tiptap/vue-3 is a rich-text editor framework for Vue 3, built on top of ProseMirror. It provides a highly customizable and extensible editor experience, allowing developers to create complex text editing interfaces with ease.

What are @tiptap/vue-3's main functionalities?

Basic Editor Setup

This code sets up a basic editor using @tiptap/vue-3 with the StarterKit extension, which includes common features like bold, italic, and lists.

```json
{
  "template": "<editor-content :editor=\"editor\" />",
  "setup": "import { EditorContent, useEditor } from '@tiptap/vue-3';
import StarterKit from '@tiptap/starter-kit';

export default {
  components: {
    EditorContent,
  },
  setup() {
    const editor = useEditor({
      extensions: [StarterKit],
      content: '<p>Hello World!</p>',
    });

    return {
      editor,
    };
  },
};"
}
```

Custom Extensions

This code demonstrates how to create a custom extension for @tiptap/vue-3, allowing you to add custom commands and functionality to the editor.

```json
{
  "template": "<editor-content :editor=\"editor\" />",
  "setup": "import { EditorContent, useEditor } from '@tiptap/vue-3';
import { Extension } from '@tiptap/core';

const CustomExtension = Extension.create({
  name: 'custom',
  addCommands() {
    return {
      setCustom: () => ({ commands }) => {
        return commands.insertContent('<p>Custom Content</p>');
      },
    };
  },
});

export default {
  components: {
    EditorContent,
  },
  setup() {
    const editor = useEditor({
      extensions: [CustomExtension],
      content: '<p>Initial Content</p>',
    });

    return {
      editor,
    };
  },
};"
}
```

Collaboration

This code sets up a collaborative editor using @tiptap/vue-3 and the y-webrtc provider, allowing multiple users to edit the same document in real-time.

```json
{
  "template": "<editor-content :editor=\"editor\" />",
  "setup": "import { EditorContent, useEditor } from '@tiptap/vue-3';
import Collaboration from '@tiptap/extension-collaboration';
import { WebrtcProvider } from 'y-webrtc';
import * as Y from 'yjs';

const ydoc = new Y.Doc();
const provider = new WebrtcProvider('your-room-name', ydoc);

export default {
  components: {
    EditorContent,
  },
  setup() {
    const editor = useEditor({
      extensions: [
        Collaboration.configure({
          document: ydoc,
        }),
      ],
      content: '<p>Collaborative Content</p>',
    });

    return {
      editor,
    };
  },
};"
}
```

Other packages similar to @tiptap/vue-3

Keywords

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc